#ifndef WII_H
#define WII_H

#include "world.h"
#include "player.h"

extern "C" {
    #include "wiimote_api.h"
}

#define A 1
#define B 2
#define UP 3
#define DOWN 4
#define LEFT 5
#define RIGHT 6
#define HOME 7
#define PLUS 8
#define MINUS 9

#define X 10
#define Y 11
#define Z 12

#define CCR 1
#define CR 2
#define DU 3
#define DD 4

//values to normalize
#define normX -130
#define normY -130
#define normZ -158

class Wii
{
public:
    Wii();
    static void wiiInit();
    static void *wiiRun(void *arg);
    static void wiiRumble(bool wiiRumble);
    static void wiiSetRumble(bool wiiRumble);
    static bool wiiGetRumble();

    static bool isButtonDown(int button);
    static int axisValue(int axis);
    static bool getGesture(int gesture);
    static void setGesture(int gesture, bool recognised);

    static Ogre::Vector3 getVector(float time);
    static int mod(int x, int m);
};

#endif // WII_H
